package com.jiang.redis.single;

import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;

/**
 * @author jiangwz
 * @create 2019/3/11.
 */
public class PubClient {

    public static void main(String[] args){
        // 连接redis服务端
        JedisPool jedisPool = new JedisPool(new JedisPoolConfig(), "127.0.0.1", 6379);

        System.out.println(String.format("redis pool is starting, redis ip %s, redis port %d", "127.0.0.1", 6379));

        Publisher01 publisher = new Publisher01(jedisPool.getResource());    //发布者
        publisher.start();
    }
}
